package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 网络连接记录对象 net_info_log
 * 
 * @author ruoyi
 * @date 2025-09-17
 */
public class NetInfoLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录序号 */
    private Long logId;

    /** IP地址 */
    @Excel(name = "IP地址")
    private String ip;

    /** 检测类型（0：ip可达；1：ip与端口可达） */
    @Excel(name = "检测类型", readConverterExp = "0=：ip可达；1：ip与端口可达")
    private Integer type;

    /** 端口号 */
    @Excel(name = "端口号")
    private Long port;

    /** 检测结果（0：失败；1：成功） */
    @Excel(name = "检测结果", readConverterExp = "0=：失败；1：成功")
    private Integer result;

    /** 连接时间 */
    @JsonFormat(pattern = "yyyy-MM-dd yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "连接时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date connectTime;

    /** 部门ID */
    @Excel(name = "部门ID")
    private Long deptId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    public void setLogId(Long logId) 
    {
        this.logId = logId;
    }

    public Long getLogId() 
    {
        return logId;
    }

    public void setIp(String ip) 
    {
        this.ip = ip;
    }

    public String getIp() 
    {
        return ip;
    }

    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }

    public void setPort(Long port) 
    {
        this.port = port;
    }

    public Long getPort() 
    {
        return port;
    }

    public void setResult(Integer result) 
    {
        this.result = result;
    }

    public Integer getResult() 
    {
        return result;
    }

    public void setConnectTime(Date connectTime) 
    {
        this.connectTime = connectTime;
    }

    public Date getConnectTime() 
    {
        return connectTime;
    }

    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("logId", getLogId())
            .append("ip", getIp())
            .append("type", getType())
            .append("port", getPort())
            .append("result", getResult())
            .append("connectTime", getConnectTime())
            .append("deptId", getDeptId())
            .append("userId", getUserId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
